<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<head>
    <title>Fly社区</title>
    <head th:insert="~{import :: head}"></head>
</head>
<body onload="isClose()">
<div th:replace="navigation :: nav"></div>
<div class="container-fluid main">
    <div class="row">
        <div class="col-md-9 col-md-12 col-sm-12 col-xs-12">
            <h3><span class="glyphicon glyphicon-list" aria-hidden="true"></span> 发现</h3>
            <hr/>
            <div class="media" th:each="question : ${questions}">
                <div class="media-left">
                    <a href="#">
                        <img class="media-object img-rounded" th:src="${question.user.avatarUrl}" alt="jpg">
                    </a>
                </div>
                <div class="media-body">
                    <a th:href="@{'/question/?id='+${question.id}}">
                        <h5 class="media-heading" th:text="${question.title}"></h5>
                    </a>
                    <span class="text-desc">•
                        <span th:text="${question.commentCount}"></span> 个回复 •
                        <span th:text="${question.viewCount}"></span> 次浏览 •
                        <span th:text="${question.likeCount}"></span> 个喜欢 •
                        <span th:text="${question.pubtime}"></span>
                    </span>
                </div>
                <hr th:unless="${question.equals(questions.get(questions.size()-1))}">
            </div>
            <nav aria-label="Page navigation" class="pull-right">
                <ul class="pagination">
                    <!--首页-->
                    <li th:if="${pageInfo.getShowFirstPage()}">
                        <a th:href="@{/(currPage=1,keyword=${keyword != null ? keyword:''})}" aria-label="First">
                            <span aria-hidden="true">&laquo;</span>
                        </a>
                    </li>

                    <!--上一页-->
                    <li th:if="${pageInfo.getShowPrevPage()}">
                        <a th:href="@{/(currPage=${pageInfo.getCurrPage()-1},keyword=${keyword != null ? keyword:''})}"
                           aria-label="Previous">
                            <span aria-hidden="true">&lt;</span>
                        </a>
                    </li>

                    <!--显示页-->
                    <li th:each="page : ${pageInfo.getPages()}" th:class="${pageInfo.currPage == page}? 'active' : ''">
                        <a th:href="@{/(currPage=${page},keyword=${keyword != null ? keyword:''})}" th:text="${page}"
                           aria-label="Pages"></a>
                    </li>

                    <!--下一页-->
                    <li th:if="${pageInfo.getShowNextPage()}">
                        <a href="#"
                           th:href="@{/(currPage=${pageInfo.getCurrPage()+1},keyword=${keyword != null ? keyword:''})}"
                           aria-label="Next">
                            <span aria-hidden="true">&gt;</span>
                        </a>
                    </li>

                    <!--尾页-->
                    <li th:if="${pageInfo.getShowEndPage()}">
                        <a th:href="@{/(currPage=${pageInfo.getEndPage()},keyword=${keyword != null ? keyword:''})}"
                           aria-label="End">
                            <span aria-hidden="true">&raquo;</span>
                        </a>
                    </li>
                </ul>
            </nav>
        </div>
        <div class="col-md-3 col-md-12 col-sm-12 col-xs-12">
            <!-- 问题发起指南 -->
            <div class="aw-mod publish-help">
                <div class="mod-head">
                    <h3>热门话题</h3>
                </div>
            </div>
            <!-- end 问题发起指南 -->
        </div>
    </div>
</div>
<div th:replace="footer :: foot"></div>
</body>
</html>